function includedTaxType (row) {
  const item = row.includedTax
  if (item === '0') {
    return '否'
  }
  else {
    return row.taxRate
  }
}

export const columns = [
  {
    prop: 'orderName',
    minWidth: '140',
    label: '委托名称',
    'show-overflow-tooltip': true
    // slotName: 'orderName'
  },
  {
    prop: 'projectNo',
    minWidth: '150',
    label: '项目编号'
  },
  {
    prop: 'purchaseName',
    minWidth: '150',
    label: '采购单位'
  },
  {
    prop: 'sumBudget',
    minWidth: '150',
    label: '总预算（元）'
  },
  {
    prop: 'consignee',
    minWidth: '100',
    label: '联系人'
  },
  {
    prop: 'pledgePrice',
    minWidth: '100',
    label: '保证金金额'
  },
  {
    prop: 'phone',
    minWidth: '140',
    label: '联系电话'
  },
  {
    prop: 'updateTime',
    minWidth: '160',
    label: '最后修改日期'
  },
  {
    prop: 'orderStateName',
    minWidth: '100',
    label: '委托状态'
  },
  {
    fixed: 'right',
    minWidth: '180',
    label: '操作',
    slotName: 'operation'
  }
]

export const columns1 = [
  {
    prop: 'goodsName',
    width: '140',
    label: '商品名称',
    slotName: 'goodsName'
  },
  {
    prop: 'brandName',
    width: '140',
    label: '品牌',
    slotName: 'brandName'
  },
  {
    prop: 'unit',
    minWidth: '150',
    label: '规格型号'
  },
  {
    prop: 'price',
    minWidth: '150',
    label: '预算单价'
  },
  {
    prop: 'includedTax',
    minWidth: '150',
    label: '是否含税',
    formatter: includedTaxType
  },
  {
    prop: 'buyNum',
    minWidth: '150',
    label: '数量'
  },
  {
    prop: 'budget',
    minWidth: '150',
    label: '总价'
  },
  {
    prop: 'unit',
    minWidth: '150',
    label: '计量单位'
  },
  {
    minWidth: '150',
    label: '需求附件',
    slotName: 'demandDocument'
  },
  {
    prop: 'remark',
    width: '140',
    label: '备注',
    slotName: 'remark'
  }
]

export const columns2 = [
  {
    prop: 'firstCodeName',
    minWidth: '150',
    label: '节点名称'
  },
  {
    prop: 'createTime',
    minWidth: '150',
    label: '处理时间'
  },
  {
    prop: 'personName',
    minWidth: '150',
    label: '处理人'
  },
  {
    prop: 'remark',
    width: '140',
    label: '说明',
    slotName: 'remark'
  }
]

export const columns3 = [
  {
    prop: 'suppChinaName',
    minWidth: '150',
    label: '供应商名称'
  },
  {
    prop: 'biddingLinkman',
    minWidth: '150',
    label: '联系人'
  },
  {
    prop: 'biddingLinkmanMobile',
    minWidth: '150',
    label: '联系人手机'
  },
  {
    prop: 'biddingCount',
    minWidth: '150',
    label: '已报价次数'
  },
  {
    prop: 'sumPrice',
    minWidth: '150',
    label: '总报价（元）'
  },
  {
    prop: 'biddingStateName',
    minWidth: '150',
    label: '询价状态'
  },
  {
    prop: 'stateName',
    minWidth: '150',
    label: '定标状态'
  }
]
